<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="p" uri="/WEB-INF/tld/pagination.tld"%>  
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<title>采购价格资料</title>		
		<link rel="stylesheet" type="text/css" href="css/public.css">
		<script type="text/javascript" src="js/sorttable.js"></script>
		<script language="JavaScript" src="js/public.js"></script>		
		<script type="text/javascript" src="js/date1.js"></script>
		<script type="text/javascript" charSet="UTF-8" src="js/checkboxSelect.js"></script>
	</head>

	<body>
		<div id="info_all">
			<div id="info_top"> 
				采购价格资料 
			</div>
			<!-- 主输入区 -->
			<!-- 功能按钮 -->
			<s:form action="showStockPrices.action" method="post" theme="simple" id="delrow" cssClass="submitForm">
			<div id="btn">
				<input type="button" value="新增" onClick="addAction('addInputStockPrice')" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="修改" onClick="updateAction('updateStockPrice')" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="删除" onClick="deleteAction('deleteStockPrice')" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="审核" onClick="AudingAction('checkStockPrice')" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="反审核" onClick="unAudingAction('unCheckStockPrice')" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
				<input type="button" value="限价" onclick="priceControl('priceInputStockPrice')" onFocus="this.blur()"
					onmouseover="this.className='btnover'"
					onmouseout="this.className='btnout'" class="btnsize" />
			</div>
			<div id="info_main">				
				<div id="select">
					<hr>
					<table>
						<tr>
							<%--<td>
								物料代码&nbsp;
							</td>
							<td>
								<s:textfield name="stockPriceDTO.materialModel.materialCode" size="12"></s:textfield>
								&nbsp;&nbsp;&nbsp;
							</td>
							--%><td>
								物料名称&nbsp;
							</td>
							<td>
								<s:hidden name="pbaseStockPriceModel.PBaseVerifyprojectMaterialId" id="materialId"></s:hidden>
								<s:textfield name="" size="12" id="materialName" readonly="true"></s:textfield><img src="images/kookup.gif" style="cursor:pointer" onclick="openWin('materialAction.action','material',750,700,0)">
							</td>
				
							<%--<td>供应商代码&nbsp;</td>
							<td>
								<s:textfield name="stockPriceDTO.supplierModel.supplierCode" size="12"></s:textfield>
								&nbsp;&nbsp;&nbsp;
							</td>
							--%><td>供应商名称</td>
							<td>
								<s:hidden name="pbaseStockPriceModel.PBaseVerifyprojectSupplierId" id="supplierId"></s:hidden>
								<s:textfield name="" size="12" id="supplierName" readonly="true"></s:textfield><img src="images/kookup.gif" style="cursor:pointer" onclick="openWin('supplierSelect.action','supplier',750,700,0)">
							</td>
							<td>状态</td>
							<td>
								<s:select list="#{'2':'全部','0':'未审核','1':'审核'}" cssStyle="width:96px" name="pbaseStockPriceModel.auditState"></s:select>
							</td>
						</tr>
					</table>
				</div>
				<div class="sele">
					<input type="submit" value="查询" onFocus="this.blur()"
						onmouseover="this.className='btnover'"
						onmouseout="this.className='btnout'" class="btnsize" />
					<input type="reset" value="重置" onFocus="this.blur()"
						onmouseover="this.className='btnover'"
						onmouseout="this.className='btnout'" class="btnsize"/>
						<hr>
				</div>
				
				<!-- 信息显示栏 -->
				<div id="info_info2">
					<table width="1200px" cellpadding="1"  cellspacing="1"  class="sortable" id="info_table" >
						<thead>
							<tr>
								<th><input type="checkbox"  onClick="selectAll()"/></th>
								<th width="80px">
									审核标志
								</th>
								<th width="110px">
									供应商名称
								</th>
								<th width="110px">
									供应商代码
								</th>
								<th width="80px">
									物料代码
								</th>
								<th width="80px">
									物料名称
								</th>
								<th width="80px">
									规格型号
								</th>
								<th width="80px">
									计量单位
								</th>
								<th width="110px">
									订货量(从)
								</th>
								<th width="110px">
									到货量(到)
								</th>
								<th width="80px">
									报价
								</th>
								<th width="80px">
									最高限价
								</th>
								<th width="140px">备注</th>
								
							</tr>
						</thead>
						<tbody id="mbody">
						<s:iterator value="stockPriceDtoList" status="statu">
							<tr>
								<td>
									<s:hidden name="stockpriceModel.stockPriceId"></s:hidden>
									<s:checkbox name="rowlist" fieldValue="%{stockpriceModel.stockPriceId}"></s:checkbox>	
								</td>
								<td>
									<s:if test="stockpriceModel.auditState==1">
										审核
									</s:if>
									<s:elseif test="stockpriceModel.auditState==0">
										未审核
									</s:elseif>
								</td>
								<td>
									<s:property value="supplierModel.supplierName"/>&nbsp;
								</td>
								<td>
									<s:property value="supplierModel.supplierCode"/>&nbsp;
								</td>
								<td>
									<s:property value="materialModel.materialName"/>&nbsp;
								</td>
								<td>
									<s:property value="materialModel.materialCode"/>&nbsp;
								</td>
								<td>
									<s:property value="materialModel.Spec"/>&nbsp;
								</td>
								<td>
									<s:property value="materialModel.basicMeasureUnit"/>&nbsp;
								</td>
								<td>
									<s:property value="stockpriceModel.stockNumberFrom"/>&nbsp;
								</td>
								<td>
									<s:property value="stockpriceModel.stockNumberTo"/>&nbsp;
								</td>
								<td>
									<s:property value="stockpriceModel.bid"/>&nbsp;
								</td>
								<td>
									<s:property value="stockpriceModel.topBid"/>&nbsp;
								</td>
								<td>
									<s:property value="stockpriceModel.memo"/>&nbsp;
								</td>										
							</tr>
						</s:iterator>
							
						</tbody>
						<tfoot>
							<tr></tr>
						</tfoot>
				  </table>
				  <s:if test="!stockPriceDtoList.isEmpty">
							<tr style="font-size: 12px;">

								<div align="center">
									<font color="#FF0000"> 共<s:property value="page.total" /> 页 第
										<s:property value="page.cpage" /> 页 <p:page cpage="%{page.cpage}"
											total="%{page.total}" url="%{page.url}" /> </font>

								</div>
							</tr>
						</s:if>
					<script language="javascript">  
						//("表格名称","奇数行背景","偶数行背景","点击后背景");
						 mouseclick("info_table","#ffffff","#ffffff","#e6f0fd");
						 //("表格名称","奇数行背景","偶数行背景");
						 //setcolor("t","#ffffff","#ffffff");
						
					</script>
				</div>
			</div>
			</s:form>
		</div>
	</body>
</html>

